package benchmarks.tpch.mongo.domain;

import java.util.Date;

public class Nation extends TPCHDomain<Integer>{
//    TPCHLoaderMySQL.CastTypes.LONG,   // n_nationkey
//    TPCHLoaderMySQL.CastTypes.STRING, // n_name
//    TPCHLoaderMySQL.CastTypes.LONG,   // n_regionkey
//    TPCHLoaderMySQL.CastTypes.STRING  // n_comment
    private int n_nationkey; //1 //primary
    private String n_name; //2
    private int n_regionkey; //3
    private String n_comment; //4

    @Override
    public void setInt(int pos, int value) {
        if (pos == 1) {
            n_nationkey = value;
        }
        else if (pos == 3) {
            n_regionkey = value;
        } else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setDouble(int pos, double value) {
        System.out.println("Wrong pos");
    }

    @Override
    public void setString(int pos, String value) {
        if (pos == 2) {
            n_name = value;
        }
        else if (pos == 4) {
            n_comment = value;
        }
        else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setDate(int pos, Date value) {
        System.out.println("Wrong pos");
    }

    @Override
    public Integer getPrimaryKey() {
        return n_nationkey;
    }

    public int getN_nationkey() {
        return n_nationkey;
    }

    public void setN_nationkey(int n_nationkey) {
        this.n_nationkey = n_nationkey;
    }

    public String getN_name() {
        return n_name;
    }

    public void setN_name(String n_name) {
        this.n_name = n_name;
    }

    public int getN_regionkey() {
        return n_regionkey;
    }

    public void setN_regionkey(int n_regionkey) {
        this.n_regionkey = n_regionkey;
    }

    public String getN_comment() {
        return n_comment;
    }

    public void setN_comment(String n_comment) {
        this.n_comment = n_comment;
    }
}
